define(() => {
	return function(cont, serverData, localData) {
		let str = "";
		serverData.forEach(val1 => {
			localData.forEach(val2 => {
				if (val1.proId === val2.id) {
					str += `<div class="goodsall" data-id="${val2.id}">
						<div>
							<input type="checkbox" class="goodsbox" ${val2.flag ? "checked":""}>
							<img
								src="${val1.img}">
							<p class="intruc addhov">${val1.proName}
							</p>

						</div>
						<div></div>
						<div>${val1.price}</div>
						<div>
							<button class="btn-sub">-</button>
							<input type="text" value="${val2.num}" class="setnum">
							<button class="btn-add">+</button>
						</div>
						<div class="smallpay">${val1.price*val2.num}</div>
						<div>
							<p class="addhov del">删除</p>
							<p class="addhov">移入到我的收藏</p>
						</div>
					</div>`;
				}
			})
		})
		cont.html(str);
	}
})
